﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Command_Pattern
{
    class StopCommand : ICommand
    {
        IMoviePlayer moviePlayer;

        public StopCommand(IMoviePlayer moviePlayer)
        {
            this.moviePlayer = moviePlayer;
        }

        public void Execute()
        {
            moviePlayer.StopMovie();
        }

        public void Undo()
        {
            moviePlayer.PlayMovie();
        }
    }
}
